package com.inet.p12_toolbar;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


        Toolbar toolbar = findViewById(R.id.toolbar);
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            private static final String TAG = "wz";

            @Override
            public void onClick(View view) {
                Log.d(TAG, "onClick: toolbar返回按钮被点击了");
            }
        });


        Toolbar tb2 = findViewById(R.id.toolbar2);
        tb2.setLogo(R.drawable.ic_get_up);



    }
}